/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.allscore.procedure.test.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedStoredProcedureQuery;
import javax.persistence.ParameterMode;
import javax.persistence.StoredProcedureParameter;
import javax.persistence.Table;

/**
 * @author Administrator
 */
@Entity
@Table(name = "worker")
@NamedStoredProcedureQuery(name = "worker.procEmp", procedureName = "procEmp", parameters = {
        @StoredProcedureParameter(name = "arg", mode = ParameterMode.IN, type = Integer.class),
        @StoredProcedureParameter(name = "res", mode = ParameterMode.OUT, type = Integer.class)
})
public class Worker implements Serializable {

    //    @GeneratedValue
    @Id
//    @Column(name = "id")
    private long id;

    //    @Column(name = "name")
    private String name;

    //    @Column(name = "age")
    private long age;

    //    @Column(name = "age_desc")
    private String ageDesc;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getAge() {
        return age;
    }

    public void setAge(long age) {
        this.age = age;
    }

    public String getAgeDesc() {
        return ageDesc;
    }

    public void setAgeDesc(String ageDesc) {
        this.ageDesc = ageDesc;
    }

    @Override
    public String toString() {
        return "Worker{" + "id=" + id + ", name=" + name + ", age=" + age + ", ageDesc=" + ageDesc + '}';
    }

}
